//
//  NSObject+Caculator.m
//  02-链式编程思想(计算器)
//
//  Created by J on 16/2/18.
//  Copyright © 2016年 J. All rights reserved.
//

#import "NSObject+Caculator.h"
#import "CaculatorMaker.h"
@implementation NSObject (Caculator)

+ (NSInteger )makeCaculator:(void(^)(CaculatorMaker *))block {
    //创建计算制造者
    CaculatorMaker* maker = [CaculatorMaker new];
    //计算
    block(maker);
    return maker.result;
    
}
@end
